package com.financing.platform.dto;

import java.util.Date;

import com.financing.platform.common.CsvExportable;

public class ProductSupplierDTO extends BaseDTO implements CsvExportable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8630421382707482736L;

	private String id;
	
	private String faId;//理财师id
	
	private String name;//姓名

	private String companyAddress;//公司地址
	
	private String companyName;//公司名称
	
	private String mobile;//手机
	
	private String businessCardAddress;//名片地址
	
	private String checkStatus;//审核状态 1认证通过，2认证不通过
	
	private String blackList;//黑名单  1是  2否
	
	private String level;//评级
	
	private String emailAddress;//邮箱地址
	
	private String failReson;//失败原因
	
	private String companyPosition;//公司职位
	
	private String auditRemarks;//审核备注
	
	private String remarks;//备注
	
	private String flagVisit;//是否回访 1已回访，2未回访

	private String loginName;//冗余 登录名
	private Date lastLoginTime;//冗余 登录名
	private String lastLoginIp;//冗余 登录名
	private Date faCreateDate;//冗余 登录名
	public String getCompanyAddress() {
		return companyAddress;
	}

	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getBusinessCardAddress() {
		return businessCardAddress;
	}

	public void setBusinessCardAddress(String businessCardAddress) {
		this.businessCardAddress = businessCardAddress;
	}

	public String getCheckStatus() {
		return checkStatus;
	}

	public void setCheckStatus(String checkStatus) {
		this.checkStatus = checkStatus;
	}

	public String getBlackList() {
		return blackList;
	}

	public void setBlackList(String blackList) {
		this.blackList = blackList;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getFailReson() {
		return failReson;
	}

	public void setFailReson(String failReson) {
		this.failReson = failReson;
	}

	public String getCompanyPosition() {
		return companyPosition;
	}

	public void setCompanyPosition(String companyPosition) {
		this.companyPosition = companyPosition;
	}

	public String getFlagVisit() {
		return flagVisit;
	}

	public void setFlagVisit(String flagVisit) {
		this.flagVisit = flagVisit;
	}

	public String getFaId() {
		return faId;
	}

	public void setFaId(String faId) {
		this.faId = faId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	
	
	

	public String getAuditRemarks() {
		return auditRemarks;
	}

	public void setAuditRemarks(String auditRemarks) {
		this.auditRemarks = auditRemarks;
	}
	
	

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLastLoginIp() {
		return lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	public Date getFaCreateDate() {
		return faCreateDate;
	}

	public void setFaCreateDate(Date faCreateDate) {
		this.faCreateDate = faCreateDate;
	}

	
	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	@Override
	public String csvTitle() {
		return "登录名,手机号码,姓名,公司地址,公司名称,职位,状态";
	}

	@Override
	public String toCsvString() {
		StringBuilder builder = new StringBuilder();
		builder.append(getLoginName()).append(",")
		.append(getMobile()).append(",")
		.append(getName()).append(",")
		.append(getCompanyAddress()).append(",")
		.append(getCompanyName()).append(",")
		.append(getCompanyPosition()).append(",")
		.append(toConvertDec(getCheckStatus())).append(",");
		return builder.toString();
	}
	public String toConvertDec(String chckStatus){
		if("0".equals(chckStatus)){
			return "未提交认证";
		}else if("1".equals(chckStatus)){
			return "认证已通过";
		}else if("2".equals(chckStatus)){
			return "认证审核中";
		}else if("3".equals(chckStatus)){
			return "认证失败";
		}else if("4".equals(chckStatus)){
			return "认证通过（个人产品提供方）";
		}else if("5".equals(chckStatus)){
			return "认证通过（机构产品提供方）";
		}else {
			return chckStatus;
		}
	}
	
}
